package sized.frame.test.karcio;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class SizedFrame extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public SizedFrame() {

		Toolkit toolkit =Toolkit.getDefaultToolkit();
		Dimension screenSize = toolkit.getScreenSize();
		int screenHeight = screenSize.height;
		int screenWidth = screenSize.width;

		setSize(screenWidth / 2, screenHeight / 2);
		setLocationByPlatform(true);
		
		Image img = toolkit.getImage("icon.gif");
		setIconImage(img);
		setTitle("My application");
		

	}

}
